package com.housediyadmin.view.components
{
	import com.housediyadmin.model.ListTypeModel;
	
	import mx.binding.utils.BindingUtils;
	
	import org.robotlegs.mvcs.Mediator;
	
	/**
	 * 
	 * @author liaoruohuai
	 * 
	 */
	public class TypeListMediator extends Mediator
	{
		[Inject]
		public var view:TypeList;
		
		[Inject]
		public var model:ListTypeModel;
		
		override public function onRegister():void
		{
            switch(view.id)
			{
				case "doorList":
					BindingUtils.bindProperty(view, "dataProvider", model, "doorXMLList");
					break;
				case "windowList":
					BindingUtils.bindProperty(view, "dataProvider", model, "windowXMLList");
					break;
				case "floorList":
					BindingUtils.bindProperty(view, "dataProvider", model, "floorXMLList");
					break;
			}
			//view.addEventListener(ListItemMouseEvent.ITEM_MOUSE_UP, listMouseUpHandler);
			//view.addEventListener(MouseEnabledAdminEvent.CLOSE_BTN_CLICKED, closeBtnClickHandler);
		}
	}
}